POV-Ray : Newsgroups : moray.win : Ingo's Make Mesh include with udo support : Re: Ingo's Make Mesh include with udo support Server Time
1 Jun 2024 15:07:41 EDT (-0400)
  Re: Ingo's Make Mesh include with udo support  
From: StephenS
Date: 1 Feb 2004 13:06:05
Message: <401d400d@news.povray.org>
> Stephen,
> I experimented with a heightfield on a cylinder and a sphere with
excellent
> results, but what I'd really like to do is create a heightfield on a flat
> surface, which can be converted to a mesh that can be manipulated in
Moray.
The regular heightfield object in Moray can be converted to a mesh. You can
use the step control (heightfield object) to help setup the number of
triangles used.

> I tried doing this with p_square.pov, but could not figure out the proper
> coding. I need to have values for F1, F2, and F3, and I don't have a clue
> what they should be. I tried different things and got some interesting
> shapes, but nothing even in the same universe as what I was trying for. Do
> you have any suggestions?
> Steve Shelby

Try this, based on p_square.pov
#declare Name= function {
  pigment {
    image_map {
      png "blurred name.png"
       interpolate 2
       once
    }
  #declare S= 2;
  scale <4*S,3*S,1>
  translate <-4,-3,0>
  }
}
#declare F1= function(u,v){u}
#declare F2= function(u,v){v}
#declare F3= function(u,v){Name(u,v,0).gray}

Some variations on using a name are:
#declare Mytextname=text{
   ttf "timrom.ttf" "Stephen" 1, .1*x
   scale<.24,.24,1>  // scale to fit from 0 to 1
   translate<.02,.5,-.1>}
#declare ob_Name= function {
  pigment{
    object {
      Mytextname
    }
  #declare S= 2;
  scale <4*S,3*S,1>
  translate <-4,-3,0>
  }
}
#declare F3= function(u,v){ob_Name(u,v,0).gray}

Or
#declare f_ob_Name= function {
  pigment {
    image_map {
      function 600,600 {
        pigment{
          object {
            Mytextname
          }
        }
      }
      once
      interpolate 2
    }
  #declare S= 2;
  scale <4*S,3*S,1>
  translate <-4,-3,0>
  }
}
#declare F3= function(u,v){f_ob_Name(u,v,0).gray}

Comments welcome

Stephen


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.